home *** CD-ROM | disk | FTP | other *** search
/ Sprite 1984 - 1993 / Sprite 1984 - 1993.iso / lib / pmake / debugflags.mk < prev    next >
Encoding:
Text File  |  1992-11-28  |  1.4 KB  |  57 lines

  1. #
  2. # This Makefile is included by several other system Makefiles.  It
  3. # sets OFLAG and GFLAG, which control optimization and debugging
  4. # support, and are eventually included in CFLAGS.  This Makefile is
  5. # distinct from tm.mk because the comments in tm.mk state that this
  6. # functionality should be separate.
  7. # This Makefile uses the following variables as input:
  8. # NOOPTIMIZATION    If this variable is defined, then optimization
  9. #            is suppressed.
  10. # TM            The machine type being compiled for.
  11. #
  12. # $Header: /sprite/lib/pmake/RCS/debugflags.mk,v 1.3 92/11/27 17:16:46 jhh Exp $
  13. #
  14.  
  15. #
  16. # OFLAG : optimization flag
  17. # GFLAG : debugging support when optimization is turned on
  18. # GDFLAG : debugging support when optimization is turned off (D for Debug)
  19. # AGFLAG: same as for GFLAG, but for .s files
  20. # AGDFLAG: samse as for GDFLAG, but for .s files
  21.  
  22. #ifndef NOOPTIMIZATION
  23. OFLAG = -O
  24. #if !empty(TM:Mds3100) || !empty(TM:Mds5000)
  25. #if empty(CC:Mgcc)
  26. GFLAG = -g3
  27. GDFLAG = -g
  28. AGFLAG = $(GFLAG)
  29. AGDFLAG = $(GDFLAG)
  30. #else
  31. # I wish I knew why GFLAG is set empty here. -mdk
  32. GFLAG    =
  33. GDFLAG    =
  34. AGFLAG = $(GFLAG)
  35. AGDFLAG = $(GDFLAG)
  36. #endif /* gcc */
  37. #else /* not compiling for a DECstation */
  38. GFLAG = -g
  39. GDFLAG = -g
  40. AGFLAG =
  41. AGDFLAG = 
  42. #endif
  43.  
  44. #else /* NOOPTIMIZATION */
  45.  
  46. OFLAG =
  47. GFLAG = -g
  48. GDFLAG = -g
  49. #if !empty(TM:Mds3100) || !empty(TM:Mds5000)
  50. AGFLAG = $(GFLAG)
  51. AGDFLAG = $(GDFLAG)
  52. #else
  53. AGFLAG =
  54. AGDFLAG = 
  55. #endif
  56. #endif /* NOOPTIMIZATION */
  57.